﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.DirectX.DirectSound;
using Microsoft.DirectX;
using System.IO;
using System.Threading;

namespace altest
{
  class Program
  {
    private static SoundRecorder recorder = null;    // 录音  
    static void Main(string[] args)
    {
      Console.WriteLine("程序运行");
      recorder = new SoundRecorder();
      string wavfile = null;
      wavfile = "test.wav";
      recorder.SetFileName(wavfile);
      recorder.RecStart();
      Console.WriteLine("录音中,按任意键结束...");
      Console.ReadKey(true);
      recorder.RecStop();
      recorder = null;
      Console.WriteLine("录音结束,按任意键退出程序.");
      Console.ReadKey(true);
      // */
    }
  }
}
